local hx__jinwu = fk.CreateSkill {
  name = "hx__jinwu",
  tags = { Skill.Compulsory, },

}


hx__jinwu:addEffect(fk.CardUseFinished, {
  anim_type = "special",
  can_trigger = function(self, event, target, player, data)
    if target == player and player:hasSkill(hx__jinwu.name) and player:getMark("@hx__jinwu_mark") < 4 then
      return data.card and data.card.type == Card.TypeEquip and Fk:getCardById(data.card.id).sub_type == Card.SubtypeWeapon
    end
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:addPlayerMark(player, "@hx__jinwu_mark", 1)
  end,
})
hx__jinwu:addEffect(fk.DamageCaused, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    if event == fk.DamageCaused and data.from == player and player:hasSkill(hx__jinwu.name) and player:getMark("@hx__jinwu_mark") > 0 then
      return true
    end
  end,
  on_use = function(self, event, target, player, data)
    data.damage = data.damage + player:getMark("@hx__jinwu_mark")
  end,
})

return hx__jinwu